<%@ include file="/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<tr>
	<td>
		<table>
			<caption>
				报检单详情
			</caption>
			<tr><td>
				<table  class="bean">
					<tr class="size">
					  <td width="10%"></td>
					  <td width="23%"></td>
					  <td width="10%"></td>
					  <td width="23%"></td>
					  <td width="10%"></td>
					  <td width="23"></td>
					</tr>
					<tr>
					  <td class="formLabel" >报检号</td>
					  <td>${decl.declNo}</td>
					  <td class="formLabel" >备案号</td>
					  <td>${map.appPrefix}${decl.backupCode}${decl.type}</td>
					  <td class="formLabel" >参展方</td>
					  <td><mytag:c2s key="${decl.backupCode}" type="backupCode"/> </td>
					</tr>
					<tr>
					  <td class="formLabel" >报检单位</td>
					  <td>${decl.entName}</td>
					  <td class="formLabel" >单位注册号</td>
					  <td>${decl.declRegNo}</td>
					  <td class="formLabel" >报检日期</td>
				      <td><fmt:formatDate value="${decl.declDate}"  pattern="yyyy-MM-dd"/></td>
					</tr>
					<tr>
					  <td class="formLabel" >发货人(中)</td>
					  <td>${decl.consignorCname}</td>
					  <td class="formLabel" >发货人(英)</td>
					  <td>${decl.consignorEname}</td>
					  <td class="formLabel" >存放地点</td>
					  <td>${decl.goodsPlace}</td>
					  
					</tr>
					<tr>
					  <td class="formLabel" >收货人(中)</td>
					  <td>${decl.consigneeCname}</td>
					  <td class="formLabel" >收货人(英)</td>
					  <td>${decl.consigneeEname}</td>
					  <td class="formLabel" >提单/运单号</td>
					  <td>${decl.carrierNoteNo}</td>
					</tr>
					<tr>
					  <td class="formLabel" >贸易国家/地区</td>
					  <td><mytag:c2s key="${decl.tradeCountryCode}" type="country"/></td>
					  <td class="formLabel" >贸易方式</td>
					  <td><mytag:c2s key="${decl.tradeModeCode}" type="trade"/></td>
					  <td class="formLabel" >合同号</td>
					  <td>${decl.contractNo}</td>
					</tr>
					<tr>
					  <td class="formLabel" >启运国家/地区</td>
					  <td><mytag:c2s key="${decl.despCountryCode}" type="country"/></td>
					  <td class="formLabel" >启运口岸</td>
					  <td><mytag:c2s key="${decl.despPortCode}" type="port"/></td>
					  <td class="formLabel" >合同特殊条款</td>
					  <td>${decl.specialRequire}</td>
					</tr>
					<tr>
					  <td class="formLabel" >运输方式</td>
					  <td><mytag:c2s type="tran" key="${decl.transTypeCode}" /> </td>
					  <td class="formLabel" >标记及号码</td>
					  <td>${decl.markNo}</td>
					  <td class="formLabel" >随附单据</td>
					  <td ><mytag:c2s type="impNote" key="${decl.sheetTypeCodes}" mutliKey="true" keyLength="1"/></td>
					</tr>
					<tr >
						<td class="formLabel" >报检类型</td>
   						<td><mytag:c2s key="${decl.type}" type="type"/></td>
   						<td class="formLabel" >用途</td>
					    <td><mytag:c2s key="${decl.purposeCode}" type="usage"/></td>
						<td class="formLabel" >集装箱信息</td>
					    <td>
							<c:forEach items="${map.containerList}" var="container" varStatus="stat">
								<span style="padding-right:10px;"><mytag:c2s key="${container.containerModelCode}" type="container"/>
								(<fmt:formatNumber value="${container.containerQty}" maxFractionDigits="0"/>箱)、</span>
							</c:forEach>				    
					    </td>
					</tr>
					<tr style="line-height:30px;vertical-align: bottom;">
						<td class="formLabel">可选操作</td>
						<td colspan="5">
						<%-- 
							<span><input type="button" class="button" value="设无效单" onclick="submitSetUnValidDecl(${decl.id})"></span>&nbsp;
							<span><input type="button" class="button" value="改备案号" onclick="modifyDeclBackupCode()"></span>&nbsp;
							<span><input type="button" class="button" value="改发货人" onclick="modifyDeclConsignorCname()"></span>&nbsp;
							<span><input type="button" class="button" value="更新查验" onclick="submitUpdateDeclResult(${decl.id})"></span>
						--%>
							<span ><a class="deco" href="#" onclick="submitSetUnValidDecl(${decl.id})">设为无效单</a></span>&nbsp;
							<span><a class="deco" href="#" onclick="modifyDeclBackupCode()">改备案号</a></span>&nbsp;
							<span><a class="deco" href="#" onclick="modifyDeclConsignorCname()">更改发货人</a></span>&nbsp;
							<span><a class="deco" href="#" onclick="submitUpdateDeclResult(${decl.id})">更新查验</a></span>&nbsp;
						</td>
					</tr>
					<tr>
						<td class="formLabel">操作区</td>
						<td colspan="5">
							<form id="DeclModifyForm" action="DeclModify.do" method="post">
								<span id="backupCodeSpan" style="display:none;">
									输入新备案号<input type="text" name="111" id="backupCodeInput" value="">&nbsp;&nbsp;
									<input type="button" class="button" value=" 提交 " onclick="submitModifyDeclBackupCode(${decl.id})">
								</span>
								<span id="consignorCnameSpan" style="display:none;">
									输入发货人<input type="text" name="222" id="consignorCnameInput" value="">&nbsp;&nbsp;
									<input type="button" class="button" value=" 提交 " onclick="submitModifyDeclConsignor(${decl.id})">
								</span>
							</form>
						</td>
					</tr>
				</table>
			</td></tr>
		</table>
	</td>
</tr>

<tr>
	<td>
		<table class="list">
			<caption>
				查验结果
			</caption>
			<tr class="title2">
			  <td>综合评定</td>
			  <td>检验评定</td>
			  <td>检疫评定</td>
			  <td>木包装</td>
			  <td>施检机构</td>
			  <td>施检部门</td>
			  <td>检毕日期</td>
			  <td>更新时间</td>
			</tr>
			<tr>
			  <td><mytag:c2s type="testResult" key="${decl.colligateResult}"/></td>
			  <td><mytag:c2s type="testResult" key="${decl.inspectionResult}"/></td>
			  <td><mytag:c2s type="testResult" key="${decl.quarantineResult}"/></td>
			  <td><mytag:c2s type="testResult" key="${decl.packResult}"/></td>
			  <td><mytag:c2s type="org" key="${decl.inspOrgCode}"/></td>
			  <td><mytag:c2s type="dept" key="${decl.inspOrgCode}${decl.inspDept1}"/></td>
			  <td><fmt:formatDate value="${map.inspResultSum.inspCompleteDate}" pattern="yyyy-MM-dd HH:mm"/> </td>
			  <td><fmt:formatDate value="${decl.inspectionTime}" pattern="yyyy-MM-dd HH:mm"/> </td>
			</tr>
		</table>
	</td>
</tr>